home *** CD-ROM | disk | FTP | other *** search
- /*
- File: StaticRecipient.h
-
- Copyright: © 1991-1994 by Apple Computer, Inc.
- All rights reserved.
-
- Part of the AOCE Sample SMSAM Package. Consult the license
- which came with this software for your specific legal rights.
-
- */
-
-
-
- #ifndef __STATICRECIPIENT__
- #define __STATICRECIPIENT__
-
- #ifndef __RECIPIENT__
- #include "Recipient.h"
- #endif
-
- #ifndef __OCEOBJECTS__
- #include "OCEObjects.h"
- #endif
-
- #pragma push
- #pragma segment StaticRecipient
-
- /***********************************|****************************************/
-
- class TStaticRecipient : public TRecipient
- {
- public: TStaticRecipient (
- const TRString& name,
- RecipientTypeSet type,
- RecipientStatusSet status = cUnknown,
- OSType addressType = '\?\?\?\?',
- const void* data = nil,
- unsigned long length = 0 );
-
- TStaticRecipient ( const TRecipient* copied );
-
- virtual ~TStaticRecipient();
-
- // Recipient Name/Type or CID Methods
- // ==================================
- virtual Boolean GetRecipientName (TRString& ) const;
- virtual Boolean GetRecipientType (TRString& ) const;
- virtual Boolean GetCID (CreationID& cid) const;
-
- // Path Information
- // ================
- virtual Boolean IsPathInfoPresent () const = 0; // return true if the recipient has any path information
- virtual Boolean IsPathInfoOptional () const = 0; // return true if the path info is present but not required
-
- virtual Boolean GetPathDNode (unsigned long& dNode) const; // return true if recipient has dNode, false otherwise
-
- virtual unsigned short GetPathNameCount () const; // return the number of path name items
- virtual void GetPathNameItem (unsigned short item, TRString& nodeName) const; // get item-th (one based) pathname, return true if available.
-
- virtual Boolean GetDirectoryName (DirectoryName& ) const;
-
- // Recipient Extension Data
- // ======================
- virtual Boolean IsAddressTypePresent () const = 0; // return true if an address type is present
- virtual OSType GetAddressType () const;
- virtual unsigned long GetExtensionDataSize () const;
- virtual void GetExtensionData ( unsigned long offset, void *buffer, unsigned long bufferSize ) const;
-
- // Recpient Status
- // ===============
- virtual Boolean GetResponsible () const = 0; // return true if this recipient must be delivered to, false otherwise
- virtual Boolean SetStatus ( RecipientStatusSet );
- virtual RecipientStatusSet GetStatus () const;
-
-
- protected: TStaticRecipient ( const TStaticRecipient& );
- TStaticRecipient& operator = ( const TStaticRecipient& );
-
- TRString fName;
- TRString fType;
-
- RecipientStatusSet fStatus;
- CreationID fID;
- OSType fAddressType;
- void* fData;
- unsigned long fLength;
- };
-
- /***********************************|****************************************/
-
- #pragma pop
-
- #endif // __STATICRECIPIENT__
-